/*
 * Title: 大理石去哪儿了？（Where is the Marble？）
 * Author: Yuanshun L
 * Created : 09-otc-2021
 */

#include<iostream>
#include<vector>
#include<algorithm>
#include<cstdio>
using namespace std;

#define maxn 101


int main() {
    freopen("data.in","r",stdin);
    freopen("data.out","w",stdout);

    int n,q,i,j,rnd=0; // n个大理石，q个问题
    vector<int> marble;

    while(cin>>n>>q){
        marble.clear();
        // 输入每块大理石上雕刻的数字
        while(n--){
            cin>>i;
            marble.push_back(i);
        }
        // 排序
        sort(marble.begin(),marble.end());

        // 输入q个问题，并且挨个回答
        cout<<"CASE# "<<++rnd<<endl;
        while(q--){
            cin >> i;
            j = lower_bound(marble.begin(),marble.end(),i) - marble.begin();
            if(marble[j] == i) cout<<i<<" found at "<<j+1<<endl;
            else cout<<i<<" not found"<<endl;
        }
    }
    return 0;
}